package com.sourny.ribbon.hystrix.server.controller;

import com.sourny.ribbon.hystrix.server.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sourny.yang
 * @date 2018/3/31 13:12
 */
@RestController
public class HelloController {
    @Autowired
    private HelloService helloService;

    @RequestMapping("hello")
    public String hello(){
        return helloService.sayHello();
    }

    @RequestMapping("index")
    public String index(){
        return "This is Ribbon Hystrix Server";
    }
}
